﻿<Window x:Class="PMisuseAn.EmulationEnvironmentWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Caprice: Emulation Environment" Height="734" Width="1272" Icon="images\title.ico" ResizeMode="NoResize">
     <Grid Margin="1" OpacityMask="#FFB71F1F" Height="694">
        <Label Content="Source Agent:" Height="30" HorizontalAlignment="Left" Margin="-2,-5,0,0" Name="label1" VerticalAlignment="Top" Width="88" />
        <ComboBox Height="23" HorizontalAlignment="Left" IsEditable="false" IsTextSearchEnabled="False" Margin="77,-2,0,0" Name="agent_names_cb" VerticalAlignment="Top" Width="117" Background="White" BorderBrush="LightBlue" SelectionChanged="agent_names_cb_SelectionChanged" />
        <!--<Label Content="" Height="30" HorizontalAlignment="Left" Margin="195,-5,0,0" Name="agent_mc_g_label" VerticalAlignment="Top" Width="114" />-->
        <Grid Height="298" HorizontalAlignment="Left" Margin="451,27,0,0" Name="agents_grid" VerticalAlignment="Top" Width="416">
            <WindowsFormsHost Margin="0,-3,0,0" Name="agents_wfh"/>
        </Grid>
        <Label Content="Agent interaction network" Height="30" HorizontalAlignment="Left" Margin="450,-1,0,0" Name="agentIntnet_lab" VerticalAlignment="Top" Width="160" />
        <Grid Margin="-5,25,799,-1">
            <!-- Grid contents here -->
            <TabControl Height="667" HorizontalAlignment="Left" Margin="3,0,0,0" Name="tabControl1" VerticalAlignment="Top" Width="447">
                <TabItem Header="Threat Analysis" Name="tabItem7" Style="{DynamicResource customTabItem1}">
                    <Grid Height="615" Width="434">
                        <Button Background="White" BorderBrush="{x:Null}" Height="23" HorizontalAlignment="Left" Margin="-3,92,0,0" Name="pause_sim_b" VerticalAlignment="Top" Width="25" Click="pause_sim_b_Click">
                            <Image Height="15" Source="images\PauseHS.png" Width="19" />
                        </Button>
                        <Button Background="White" BorderBrush="{x:Null}" Height="23" HorizontalAlignment="Left" Margin="-2,67,0,0" Name="stop_sim_b" VerticalAlignment="Top" Width="25" Click="stop_sim_b_Click">
                            <Image Height="15" Source="images\StopHS.png" Width="19" />
                        </Button>
                        <Button Background="White" BorderBrush="{x:Null}" Height="23" HorizontalAlignment="Left" Margin="-4,117,0,0" Name="play_sim_b" VerticalAlignment="Top" Width="26" Click="play_sim_b_Click">
                            <Image Height="15" Source="images\PlayHS.png" Width="17" />
                        </Button>
                        <!--<Label Content="Current Context:" Height="24" HorizontalAlignment="Left" Margin="30,-4,0,0" Name="label7" VerticalAlignment="Top" Width="100" />-->
                        <!--<ListBox Height="113" HorizontalAlignment="Left" Margin="736,121,0,0" Name="possible_mitigation_actions_lb" VerticalAlignment="Top" Width="411" />-->
                        <ListBox Height="608" HorizontalAlignment="Left" Margin="20,2,0,0" Name="threat_history_lb" VerticalAlignment="Top" Width="413" />
                        <!--<ListBox Height="35" HorizontalAlignment="Left" Margin="30,16,0,0" Name="specific_context_lb" VerticalAlignment="Top" Width="1095" />-->
                    </Grid>
                </TabItem>
                <TabItem Header="InteractionHistory" Name="tabItem6" Style="{DynamicResource customTabItem1}">
                    <Grid Height="640" HorizontalAlignment="Left" Name="grid1" VerticalAlignment="Top" Width="438">
                        <TabControl Height="630" HorizontalAlignment="Left" Margin="5,5,0,0" Name="tabControl3" VerticalAlignment="Top" Width="430">
                            <TabItem Header="General">
                                <ListBox Name="general_context_lb" Height="594" Width="415" />
                            </TabItem>
                            <TabItem Header="Specific">
                                <ListBox Name="specific_lb_1" />
                            </TabItem>
                        </TabControl>
                    </Grid>
                </TabItem>
                <TabItem Header="StateMachine" Name="tabItem1" Style="{DynamicResource customTabItem1}" IsEnabled="True" Visibility="Hidden">
                    <Grid Height="238" Name="grid2" Width="1156">
                        <TreeView Height="231" HorizontalAlignment="Left" Margin="-1,2,0,0" Name="state_machine_tv" ScrollViewer.VerticalScrollBarVisibility="Auto" VerticalAlignment="Top" Width="306">
                            <TreeViewItem Header="Root" IsExpanded="True" Name="state_machine_root" Selected="state_machine_root_TreeViewItem_Selected" Tag="root">
                                <TreeViewItem Header="Events" IsExpanded="True" Name="events" Selected="events_root_TreeViewItem_Selected">
                                    <!--<TreeViewItem FontStyle="Italic" Foreground="#FF2323AA" Header="New..    " Selected="event_TreeViewItem_Selected" Tag="" />-->
                                </TreeViewItem>
                                <TreeViewItem Header="States" IsExpanded="True" Name="states" Selected="states_root_TreeViewItem_Selected">
                                    <!--<TreeViewItem FontStyle="Italic" Foreground="#FF2323AA" Header="New..     " Margin="5" Selected="state_TreeViewItem_Selected" Tag="" />-->
                                </TreeViewItem>
                                <TreeViewItem Header="Transitions" IsExpanded="True" Name="transitions" Selected="transitions_root_TreeViewItem_Selected">
                                    <!--<TreeViewItem FontStyle="Italic" Foreground="#FF2323AA" Header="New..     " Selected="transition_TreeViewItem_Selected" Tag="new" />-->
                                </TreeViewItem>
                            </TreeViewItem>
                            <TreeViewItem Header="" IsExpanded="false" Visibility="Visible" />
                        </TreeView>
                        <TextBox Height="27" HorizontalAlignment="Left" Margin="385,1,0,0" Name="new_ent_name_tb" VerticalAlignment="Top" Visibility="Visible" Width="545" />
                        <Label Content="Name" Height="28" HorizontalAlignment="Left" Margin="319,-1,0,0" Name="new_ent_Name_l" VerticalAlignment="Top" Visibility="Visible" />
                        <Button Content="Apply" Height="23" HorizontalAlignment="Left" Margin="939,207,0,0" Name="apply_new_event_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="apply_new_event_b_Click" />
                        <TextBox Height="44" HorizontalAlignment="Left" Margin="385,27,0,0" Name="new_ent_desc_tb" VerticalAlignment="Top" Visibility="Visible" Width="545" />
                        <Label Content="Description" Height="28" HorizontalAlignment="Left" Margin="317,33,0,0" Name="desc_l" VerticalAlignment="Top" Visibility="Visible" />
                        <Button Content="Update" Height="23" HorizontalAlignment="Left" Margin="939,207,0,0" Name="update_event_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="update_event_b_Click" />
                        <Button Content="Delete" Foreground="#FFD82727" Height="23" HorizontalAlignment="Right" Margin="0,207,133,0" Name="delete_event_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="delete_event_b_Click" />
                        <GroupBox BorderBrush="{x:Null}" Header="" Height="115" HorizontalAlignment="Left" Margin="936,69,0,0" Name="new_event_ppties_gb" VerticalAlignment="Top" Visibility="Visible" Width="205">
                            <Grid Height="88" Width="192">
                                <Label Content="Type:" FontWeight="SemiBold" Height="28" HorizontalAlignment="Left" Margin="-2,-7,0,0" Name="label2" VerticalAlignment="Top" />
                                <RadioButton Content="Request" GroupName="event_type_g" Height="16" HorizontalAlignment="Left" IsChecked="True" Margin="73,16,0,0" Name="request_event_rb" Tag="request" VerticalAlignment="Top" />
                                <RadioButton Content="Response" GroupName="event_type_g" Height="16" HorizontalAlignment="Left" Margin="2,16,0,0" Name="response_event_rb" Tag="response" VerticalAlignment="Top" />
                                <CheckBox Checked="new_event_trigger_CheckedUnchecked" Content="Timed event" Height="16" HorizontalAlignment="Left" Margin="88,49,0,0" Name="time_event_cb" Tag="timed" Unchecked="new_event_trigger_CheckedUnchecked" VerticalAlignment="Top" />
                                <CheckBox Checked="new_event_trigger_CheckedUnchecked" Content="Call event" Height="16" HorizontalAlignment="Left" Margin="6,49,0,0" Name="call_event_cb" Tag="call" Unchecked="new_event_trigger_CheckedUnchecked" VerticalAlignment="Top" />
                                <CheckBox Checked="new_event_trigger_CheckedUnchecked" Content="Signal event" Height="20" HorizontalAlignment="Left" Margin="6,66,0,0" Name="signal_event_cb" Tag="signal" Unchecked="new_event_trigger_CheckedUnchecked" VerticalAlignment="Top" />
                                <CheckBox Checked="new_event_trigger_CheckedUnchecked" Content="Change event" Height="16" HorizontalAlignment="Left" Margin="88,66,0,0" Name="change_event_cb" Tag="change" Unchecked="new_event_trigger_CheckedUnchecked" VerticalAlignment="Top" />
                                <Label Content="Triggers:" FontWeight="SemiBold" Height="28" Margin="0,27,0,0" Name="label3" VerticalAlignment="Top" HorizontalAlignment="Left" Width="65" />
                            </Grid>
                        </GroupBox>
                        <Button Background="WhiteSmoke" Content="Define" Height="18" HorizontalAlignment="right" Margin="0,54,177,166" Name="define_state_b" Style="{DynamicResource LinkButton}" Visibility="Visible" Width="45" Click="define_state_b_Click" />
                        <Button Background="WhiteSmoke" Content="Update" Height="18" HorizontalAlignment="right" Margin="0,54,178,166" Name="update_state_b" Style="{DynamicResource LinkButton}" Visibility="Visible" Width="45" Click="update_state_b_Click" />
                        <Button Background="WhiteSmoke" Content="Delete" Foreground="#FFEB2A2A" Height="18" HorizontalAlignment="right" Margin="0,54,130,166" Name="delete_state_b" Style="{DynamicResource LinkButton}" Visibility="Visible" Width="45" Click="delete_state_b_Click" />
                        <GroupBox Header="Operational Attributes" Height="155" HorizontalAlignment="Left" Margin="311,73,0,0" Name="operational_atts_gb" VerticalAlignment="Top" Visibility="Visible" Width="622">
                            <Grid Height="143" Width="616">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="17*" />
                                    <ColumnDefinition Width="203*" />
                                    <ColumnDefinition Width="395*" />
                                </Grid.ColumnDefinitions>
                                <ListBox Grid.ColumnSpan="2" Height="109" HorizontalAlignment="Left" Margin="6,22,0,0" Name="agentAttributes_lb" ToolTip="attributes of information receivers/ senders" VerticalAlignment="Top" Width="196" />
                                <Label Content="Agent (actors) attributes" Grid.ColumnSpan="2" Height="28" HorizontalAlignment="Left" Margin="2,0,0,0" Name="label4" ToolTip=" (info. receivers/senders)" VerticalAlignment="Top" />
                                <Label Content="Environmental attributes" Grid.Column="1" Grid.ColumnSpan="2" Height="28" HorizontalAlignment="Left" Margin="190,-1,0,0" Name="label5" VerticalAlignment="Top" />
                                <!--<Label Content="Functional attributes" Grid.Column="2" Height="28" HorizontalAlignment="Left" Margin="191,0,0,0" Name="label6" VerticalAlignment="Top" />-->
                                <ListBox Grid.Column="1" Grid.ColumnSpan="2" Height="110" HorizontalAlignment="Left" Margin="190,22,0,0" Name="environmentAttributes_lb" ToolTip="attributes of mobile environment" VerticalAlignment="Top" Width="202" />
                                <!--<ListBox Grid.Column="2" Height="110" HorizontalAlignment="Left" Margin="195,22,0,0" Name="functionalAttributes_lb" ToolTip="functional attributes" VerticalAlignment="Top" Width="195" />-->
                            </Grid>
                        </GroupBox>
                        <Button Content="Apply" Height="23" HorizontalAlignment="Left" Margin="989,208,0,0" Name="state_action_apply_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="state_action_apply_b_Click" />
                        <Button Content="Update" Height="23" HorizontalAlignment="Left" Margin="937,208,0,0" Name="state_action_update_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="state_action_update_b_Click" />
                        <Button Content="Delete" Foreground="#FFD82727" Height="23" HorizontalAlignment="Left" Margin="987,208,0,0" Name="state_action_delete_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="state_action_delete_b_Click" />
                        <GroupBox Header="Transition policies" Height="157" HorizontalAlignment="Left" Margin="311,69,0,0" Name="transitionPolicies_gb" VerticalAlignment="Top" Visibility="Visible" Width="622">
                            <Grid Height="136" Visibility="Visible" Width="612">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="182*" />
                                    <ColumnDefinition Width="327*" />
                                </Grid.ColumnDefinitions>
                                <ListBox Grid.ColumnSpan="2" Height="128" HorizontalAlignment="Left" Margin="8,5,0,0" Name="transition_policies_lb" ToolTip="Transition policies" VerticalAlignment="Top" Visibility="Visible" Width="600" />
                            </Grid>
                        </GroupBox>
                        <Label Content="Start state" Height="28" HorizontalAlignment="Left" Margin="319,39,0,0" Name="start_state_l" VerticalAlignment="Top" Visibility="Visible" />
                        <ComboBox Height="23" HorizontalAlignment="Left" IsEditable="False" IsEnabled="False" Margin="385,41,0,0" Name="start_state_cb" VerticalAlignment="Top" Visibility="Visible" Width="132" />
                        <Label Content="End state" Height="28" HorizontalAlignment="Left" Margin="743,39,0,0" Name="end_state_l" VerticalAlignment="Top" Visibility="Visible" />
                        <ComboBox Height="23" HorizontalAlignment="Left" IsEnabled="False" Margin="801,41,0,0" Name="end_state_cb" VerticalAlignment="Top" Visibility="Visible" Width="128" />
                        <Label Content="Assoc. event" Height="28" HorizontalAlignment="Left" Margin="523,39,0,0" Name="ass_event_l" VerticalAlignment="Top" Visibility="Visible" />
                        <ComboBox Height="23" HorizontalAlignment="Left" IsEnabled="False" Margin="601,41,0,0" Name="associated_event_cb" VerticalAlignment="Top" Visibility="Visible" Width="128" />
                        <Button Content="Apply" Height="23" HorizontalAlignment="Left" Margin="991,190,0,0" Name="apply_new_state_transition_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="apply_new_state_transition_b_Click" />
                        <Button Content="Update" Height="23" HorizontalAlignment="Left" Margin="939,188,0,0" Name="update_new_state_transition_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="update_new_state_transition_b_Click" />
                        <Button Content="Delete" Foreground="#FFD82727" Height="23" HorizontalAlignment="Left" Margin="989,188,0,0" Name="delete_state_transition_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="delete_state_transition_b_Click" />
                        <CheckBox Content="isCallable" Height="16" HorizontalAlignment="Left" IsChecked="True" Margin="932,7,0,0" Name="isCallableState_cb" VerticalAlignment="Top" Width="73" />
                        <CheckBox Content="isCallable" Height="16" HorizontalAlignment="Left" IsChecked="True" Margin="930,9,0,0" Name="isCallableTransition_cb" VerticalAlignment="Top" Width="73" />
                    </Grid>
                </TabItem>
                <TabItem Header="KnowledgeEvolution" Name="tabItem5" Style="{DynamicResource customTabItem1}" Visibility="Hidden">
                    <Grid>
                        <Button Background="WhiteSmoke" Content="New Attribute" Height="18" HorizontalAlignment="right" Margin="0,2,1058,214" Name="add_att_b" Style="{DynamicResource LinkButton}" Width="84" />
                        <ListBox Height="212" HorizontalAlignment="Left" Margin="0,22,0,0" Name="attributes_lb" VerticalAlignment="Top" Width="579" />
                        <Button Margin="86,2,1040,213" Name="refresh_att_b" ToolTip="refresh attributes list">
                            <Image Height="15" Source="images\refresh.jpg" Width="14" />
                        </Button>
                        <ListBox Height="212" HorizontalAlignment="Left" Margin="583,22,0,0" Name="policies_lb" VerticalAlignment="Top" Width="561" />
                        <Button Background="WhiteSmoke" Content="New aggregation construct" Height="18" HorizontalAlignment="right" Margin="0,3,569,213" Name="new_aggregationrule_b" Style="{DynamicResource LinkButton}" Width="151" Click="new_aggregationrule_b_Click" />
                        <Button Background="WhiteSmoke" Content="New privacy policy" Height="18" HorizontalAlignment="right" Margin="0,3,0,213" Name="new_policy_b" Style="{DynamicResource LinkButton}" Width="108" />
                    </Grid>
                </TabItem>
            </TabControl>
        </Grid>
        <Button Background="WhiteSmoke" Content="Configure Adaptation Rules" Height="18" HorizontalAlignment="right" Margin="0,2,408,0" Name="button1" Style="{DynamicResource LinkButton}" Width="151" Click="configAdaptationMgr_Click" VerticalAlignment="Top" />
        <Grid Margin="866,16,-8,0">
            <DataGrid AlternatingRowBackground="GhostWhite" AutoGenerateColumns="true" BorderBrush="#FFE6F2F2" CellStyle="{DynamicResource MyGrid}" Height="667" HorizontalAlignment="Left" HorizontalGridLinesBrush="#FFF0F0F0" Margin="2,10,0,0" Name="adaptActionDataGrid" VerticalAlignment="Top" VerticalGridLinesBrush="#FFEBEBEB" VerticalScrollBarVisibility="Visible" Width="387" />
        </Grid>
        <Grid Height="346" HorizontalAlignment="Left" Name="fsm_grid" VerticalAlignment="Top" Width="416" Margin="451,348,0,0">
            <WindowsFormsHost Margin="1,-4,0,1" Name="fsm_wfh" />
        </Grid>
        <Label Content="Agent FSM Instance" Height="30" HorizontalAlignment="Left" Margin="451,322,0,0" Name="label6" VerticalAlignment="Top" Width="160" />
        <Label Content="Possible Mitigation Action" Height="30" HorizontalAlignment="Left" Margin="873,2,0,0" Name="label7" VerticalAlignment="Top" Width="160" />
        <Button Background="WhiteSmoke" Content="Threat-Mitigation History" Height="20" HorizontalAlignment="right" Margin="0,2,915,0" Name="button2" Style="{DynamicResource LinkButton}" Width="138" Click="threatHistory_b_Click" VerticalAlignment="Top" />
    </Grid>
</Window>
